﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace OMS.Models
{
    public class CreateItem
    {
        [Display(Name = "Item Name")]
        [Required(ErrorMessage = "Item Name cannot be blank")]
        [StringLength(30, MinimumLength = 2, ErrorMessage = "The string length must be between 2 and 30 characters")]
        public string ItemName { get; set; }

        [Display(Name = "Item Description")]
        [Required(ErrorMessage = "Item Description cannot be blank")]
        [StringLength(100, MinimumLength = 3, ErrorMessage = "The string length must be between 3 and 100 characters")]
        public string ItemDescription { get; set; }

        [Display(Name = "Item Price")]
        [Required(ErrorMessage = "Item Price cannot be blank")]
        //[StringLength(100, MinimumLength = 3, ErrorMessage = "The string length must be between 3 and 100 characters")]
       // [RegularExpression("([1-9][0-9]*)")]
        public decimal ItemPrice { get; set; }
    }
}